package cmd

import (
	"fmt"
	"svr/src/msg"
	"svr/src/ws"

	"google.golang.org/protobuf/proto"
)

func init() {
	ws.AddHandler(&msg.Ping{}, handlerPing)
	fmt.Println("-=-=-=-=-=-=-=-")
}

func handlerPing(mr proto.Message, task *ws.MsgTask) *msg.Error {
	return task.ReturnMsg(&msg.Pong{})
}
